package com.tansun.easycare.rule.rulegroup.entity;

import com.tansun.easycare.rule.common.entity.RuleBaseEntity;

public class RuleEntry extends RuleBaseEntity<RuleEntry> implements Comparable<RuleEntry> {

    private static final long serialVersionUID = 1L;
	public static String GROUPTYPE_GENERAL_0 = "0";//普通
	public static String GROUPTYPE_MUTEXCLU_1 = "1";//互斥
	public static String ACCESSMODEL_COND_0 = "0";//条件
	public static String ACCESSMODEL_WEIGHT_1 = "1";//权重
	public static String ACCESSMODEL_PRIORITY_2 = "2";//优先级

    private String projectCode;     // 项目编码
    private String manageId;        // manage_id
    private String entryCode;		// 条目编码
    private String version;        	// 版本号
    private String entryName;       // 条目名
    private String accessMode=ACCESSMODEL_COND_0;	// 准入方式 条件准入=0 权重准入=1 优先级准入=2
    private String ruleNames;		// 引用规则名
    private String conditions;		// 条件html
    private Integer sort;        	// 排序
    private String groupType;       // 组别，普通=0，互斥=1
    private Integer seq;        	// 序号

    
	public String getProjectCode() {
		return projectCode;
	}

	public void setProjectCode(String projectCode) {
		this.projectCode = projectCode;
	}

	public String getManageId() {
		return manageId;
	}

	public void setManageId(String manageId) {
		this.manageId = manageId;
	}

	public String getEntryCode() {
		return entryCode;
	}

	public void setEntryCode(String entryCode) {
		this.entryCode = entryCode;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getEntryName() {
		return entryName;
	}

	public void setEntryName(String entryName) {
		this.entryName = entryName;
	}

	public String getAccessMode() {
		return accessMode;
	}

	public void setAccessMode(String accessMode) {
		this.accessMode = accessMode;
	}

	public Integer getSort() {
		return sort;
	}


	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public String getGroupType() {
		return groupType;
	}

	public void setGroupType(String groupType) {
		this.groupType = groupType;
	}

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getRuleNames() {
		return ruleNames;
	}

	public void setRuleNames(String ruleNames) {
		this.ruleNames = ruleNames;
	}

	public String getConditions() {
		return conditions;
	}

	public void setConditions(String conditions) {
		this.conditions = conditions;
	}

	@Override
	public int compareTo(RuleEntry arg0) {
        return this.getSort().compareTo(arg0.getSort()) * -1;
	}

}
